import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger';
import * as session from 'express-session';
import { NestExpressApplication } from '@nestjs/platform-express';
import { join } from 'path';

async function bootstrap() {
  const app = await NestFactory.create<NestExpressApplication>(AppModule);
  
  app.useStaticAssets(join(__dirname, '/', 'adminView'),{
    prefix:"/"
  });
  app.use(session({ secret: 'keyboard cat', cookie: { maxAge: 60000 }}))
  await app.listen(3001);
}
bootstrap();
